function closeAIResponse(button) {
    const container = button.closest('.ai-response-container');
    container.style.display = 'none';
}

function copyContent(button) {
    const container = button.closest('.ai-response-container');
    const content = container.querySelector('.ai-response-content').innerText;
    
    navigator.clipboard.writeText(content).then(() => {
        const originalText = button.innerHTML;
        button.innerHTML = '已复制!';
        setTimeout(() => {
            button.innerHTML = originalText;
        }, 2000);
    }).catch(err => {
        console.error('复制失败:', err);
    });
} 